Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
How to block a "Comma" in HTML input with Firefox browser?

How to block a "Comma" in HTML input with Firefox browser?

This Javascript code works for Opera Browser:

          // ----- Block the "COMMA" for all inputs.
     $(document).keydown(function(e) {
         var keyCode = e.keyCode || e.which;
         if(keyCode==188){
             //  alert("COMMA has been pressed on the keyboard...") ;
             e.preventDefault();   // Note, "preventDefault" has to be within "if".
         }

     });
about 4 years ago · Santiago Gelvez
2 Respuestas
Responde la pregunta

0

Here is what worked for Firefox and 2 other browsers:

           // ----- Block the "COMMA" for all inputs.
     document.addEventListener('keydown', function(e) {
               if (e.key === ',') {
                   e.preventDefault();
                   return false;
               }
            })

Thanks

about 4 years ago · Santiago Gelvez Denunciar

0

keyCode has been deprecated. Use e.key instead.

document.addEventListener('keydown', e => {
  if (e.key === ',') {
        e.preventDefault();
        return false;
    }
})
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda